<?php

class PaymentModel extends BaseModel
{

    var $table  = 'payment';	

	
	function paytype()
	{	
	    
		$pay = $this->S_Sql_Exe(array('fields' =>'*','conditions' =>"is_online = 1 order by pay_order asc"));  
		

		foreach($pay as $i => $value)
		{
			if($value['pay_config']=='' && $value['is_cod']!=1)
			{
				unset($pay[$i]);
			}
		}
		return $pay;
	}
	
	function paychoose($type)
	{		
	    $type = intval($type);

		$pay = $this->S_Sql_Exe(array('fields' =>'*','conditions' =>"pay_id = {$type}",'return'=>'one'));  
		
		return $pay;
	}

}




?>